package cn.kgm.makeGodV2.condition;

import java.util.Arrays;

/**
 * @Version 1.8
 * @Author: Kappi
 * @Date: 2025-9-16 11:43
 * @Description: cn.kgm.makeGodV2.condition.ConditionBuilder
 */
public class ConditionBuilder {
    public static Condition traitRange(String trait, Double min, Double max,
                                       Boolean inclusiveMin, Boolean inclusiveMax) {
        boolean incMin = inclusiveMin != null ? inclusiveMin : true;
        boolean incMax = inclusiveMax != null ? inclusiveMax : true;
        return new TraitRangeCondition(trait, min, max, incMin, incMax);
    }

    public static Condition and(Condition... conditions) {
        return new LogicalCondition(LogicalCondition.Operator.AND, Arrays.asList(conditions));
    }

    public static Condition or(Condition... conditions) {
        return new LogicalCondition(LogicalCondition.Operator.OR, Arrays.asList(conditions));
    }
}
